<template>
  <div class="content">
    <h2>{{ modelValue }}</h2>
    <button @click="changeCounter">+1</button>
  </div>
</template>

<script>

  export default {
    props: {
      modelValue: {
        type: Number,
        default: 0
      }
    },
    emits: ['update:modelValue'],
    methods: {
      changeCounter() {
        this.$emit('update:modelValue', this.modelValue + 1)
      }
    }
  }
</script>

<style scoped>
</style>